import { lazy } from "react";

const HomeRouter=[
    {
        path:'/home/homes',
        element:lazy(()=>import("../pages/home/homes"))
    },
    {
        path:'/home/find',
        element:lazy(()=>import("../pages/home/find"))
    },
    {
        path:'/home/publics',
        element:lazy(()=>import("../pages/home/publics"))
    },
    {
        path:'/home/message',
        element:lazy(()=>import("../pages/home/message"))
    },
    {
        path:'/home/my',
        element:lazy(()=>import("../pages/home/my"))
    },
]
const routes=[
    {
        path:'/',
        to:'/home/homes'
    },
    {
        path:'/home',
        element:lazy(()=>import("../pages/home")),
        children:HomeRouter
    },
    {
        path:'/login',
        element:lazy(()=>import("../pages/login"))
    },
    {
        path:'/*',
        element:lazy(()=>import("../pages/404"))
    }
]

export default routes
